#@head() #@header()
<title>辅助工具</title>
#@aside("marketing")
<link href="#(path)/assets/plugins/umeditor1.2.3-utf8-jsp/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="#(path)/assets/plugins/umeditor1.2.3-utf8-jsp/third-party/template.min.js"></script>
<script type="text/javascript" charset="utf-8" src="#(path)/assets/plugins/umeditor1.2.3-utf8-jsp/umeditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="#(path)/assets/plugins/umeditor1.2.3-utf8-jsp/umeditor.min.js"></script>
<script type="text/javascript" src="#(path)/assets/plugins/umeditor1.2.3-utf8-jsp/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" src="#(path)/assets/js/jquery.tmpl.min.js"></script>
<div class="content-wrapper">
	<section class="content">
		<div class="nav-tabs-custom">
            <ul class="nav nav-tabs">
             <li class="active"><a href="#(path)/admin/page/marketing-apphelp">新建公告</a></li>
              <!--<li class="active"><a href="#tab_2" data-toggle="tab" aria-expanded="false">还款管理</a></li>-->
            </ul>
            <div class="tab-content">
              <div class="tab-pane active" id="tab_1">
				<div class="box-body">
					<table id="example1" style="width:70%;" class="table table-striped">
						<tbody>
							<tr>
								<th align="right" style="">标题：</th>
								<td><input id="name" type="text" class="form-control" placeholder="名称"></td>
							</tr>
							<tr>
								<th align="right" style="">启用：</th>
								<td>
									<select id="status" class="form-control">
										<option value="disable" >否</option>
										<option value="enable" >是</option>
									 </select>
								</td>
							</tr>
							<tr>
								<th align="right" style="">内容：</th>
								<td>
									<script type="text/plain" id="myEditor" style="width:100%;;height:240px;">
									</script>
									<script type="text/javascript">
										var um = UM.getEditor('myEditor');
									</script>
								</td>
							</tr>
							
						</tbody>
					</table>
				</div>
				<div class="box-footer">
					<button id="submit_addcarousel" type="submit" style="margin-left:50px;" class="btn btn-info ">提交</button>
					<button onclick="window.location.href='#(path)/admin/page/marketing-appcarousel'" type="submit" style="margin-left:10px;" class="btn  ">取消</button>
				  </div>
              </div>
            </div> 
            <!-- /.tab-content -->
          </div>
		  
	</section>
</div>
#@footer()
  
<script>
$("#submit_addcarousel").click(function(){
	var neirong = UM.getEditor('myEditor').getContent();
	
	ajax("/notice/edit?token=#(session.token??)",{"contents":neirong,"name":$("#name").val(),"status":$("#status").val()},function(data){
		
		if(data.code=='success'){
			layer.msg(data.msg,{icon:1,time:1000},function(){
				window.location.href="#(path)/admin/page/marketing-appnews";
			}); 
		}else{
			layer.msg(data.msg,{icon:2,time:2000}); 
		}
	});
});
</script>
</body>
</html>

